package router

import (
	"go-demo-2025/controllers/customerController"
	"go-demo-2025/validator/customerValidator"
	"net/http"

	"github.com/gin-gonic/gin"
)

// Customer 路由
func CustomerRouter(e *gin.Engine) {
	customer := e.Group("/customer")
	{
		customer.GET("/list", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{
				"code":    http.StatusOK,
				"success": "获取客户列表",
			})
		})

		customer.GET("/info", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{
				"code":    http.StatusOK,
				"success": "获取客户详情",
			})
		})

		customer.POST("/list", customerController.GetCustomerList)
		customer.POST("/info/:id", customerController.GetCustomerInfo)
		customer.POST("/add", customerValidator.AddCustomerValidate(), customerController.AddCustomer)
	}

}
